<template>
  <div>
    <div  class="app-container">
      <div class="filter-container">
        <el-tabs type="border-card">
          <el-tab-pane lazy :label="model_list.all">
            <model @numberbh='numberbh' :all_type='0' lazy></model>
          </el-tab-pane>
          <el-tab-pane lazy :label="model_list.have">
            <model @numberbh='numberbh' :all_type='1' lazy></model>
          </el-tab-pane>
          <el-tab-pane lazy :label="model_list.no">
            <model @numberbh='numberbh' :all_type='2' lazy></model>
          </el-tab-pane>
        </el-tabs>
      </div>
    </div>



  </div>
</template>

<script>
  import model from './vote_model_info.vue'
  import api from '@/api/vote/vote_model.js'
  export default {

    components: { model },
    data() {
      return {
        model_list:{
          all:'全部',
          have:'有挂靠模板',
          no:'未挂靠模板',
        }
      }
    },

    // 进入页面加载数据
    created() {
      this.get_data_list()
    },
    methods: {
      numberbh(){
        // childValue就是子组件传过来的值
        this.get_data_list()
      },
      get_data_list(){

        api.get_model_number_date({

        }).then(res => {
          this.model_list = {
              all:'全部('+res.data.all+')',
              have:'有挂靠模板('+res.data.have+')',
              no:'未挂靠模板('+res.data.no+')'
          }
        })


      }
    }
  }
</script>

<style>
</style>
